﻿namespace rpc_service.core;

[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
public class RPCHeader : Attribute
{
    public string Key { get; set; }
    public string Value { get; set; }
    public bool IsDelegate { get; set; }
    
    public RPCHeader(string key, string value)
    {
        Key = key;
        Value = value;
        IsDelegate = false; // 设置默认值
    }

    // 如果需要，可以添加一个包含 IsDelegate 参数的构造函数
    public RPCHeader(string key, string value, bool isDelegate)
    {
        Key = key;
        Value = value;
        IsDelegate = isDelegate;
    }
}